using Microsoft.WowAddonStudio.FrameXml.Serialization;

namespace Microsoft.WowAddonStudio.FrameXml.Components.Events.ScriptManager
{
    public interface IFrameXmlScriptManager
    {
        /// <summary>
        /// Adds the script.
        /// </summary>
        /// <param name="control">The control.</param>
        /// <param name="eventName">Name of the event.</param>
        /// <param name="script">The script.</param>
        void AddScript(FrameControl control, EventName eventName, string script);

        /// <summary>
        /// Removes the script.
        /// </summary>
        /// <param name="control">The control.</param>
        /// <param name="eventName">Name of the event.</param>
        void RemoveScript(FrameControl control, EventName eventName);

        /// <summary>
        /// Creates the show function.
        /// </summary>
        /// <param name="eventHandlerCode">Name of the event handler.</param>
        void CreateOrShowFunction(string eventHandlerCode);

        /// <summary>
        /// Gets a value indicating whether this instance is valid.
        /// </summary>
        /// <value><c>true</c> if this instance is valid; otherwise, <c>false</c>.</value>
        bool IsValid{ get;}
    }
}